#define PAGEONE  poke(49236,0)
#define PAGETWO  poke(49237,0)
#define TEXTMODE  0
#define GRAFMODE  2  /* graphics only           */

setcrtmode(CRTMODE)
unsigned int CRTMODE;
{
    switch(CRTMODE)
        {
    case TEXTMODE:
                   poke(49233,0);
                   PAGEONE;
                   break;
    default  :
                  poke(49239,0);   /* hi res                    */
                  PAGETWO      ;   /* avoid prodos load address */
                  poke(49232,0);   /* set graphics              */
                  poke(49234,0);   /* full graphics */

        }

}

